package com.thead;

/**
 * 继承了Thread类
 */
public class HeavyWorkThreadRun extends Thread {

    public HeavyWorkThreadRun(String name) {
        super(name);
    }

    @Override
    public void run() {
        System.out.println("HeavyWork Thread - Start" + Thread.currentThread().getName());

        try {
            Thread.sleep(1000);
            doProcessing();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    private void doProcessing() throws InterruptedException {

        Thread.sleep(2000);
    }
}
